/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package gui.event;

import javax.swing.JComponent;

/**
 * The Basic Panel for a detailed view of an event, all event types should subclass this class
 * 
 * @author Pascal
 */
public abstract class AbstractEventPanel extends javax.swing.JPanel {

    /**
     * Creates new form AbstractEventPanel
     */
    public AbstractEventPanel() {
        initComponents();
       
    }

    protected abstract void paintEventOnMap();

    /**
     * Should return a Component that is shown in the content panel. This method
     * is only called once on initComponents
     */
    public abstract JComponent getContentComponent();

    /**
     * Should return the text that is shown in the label above the content
     * panel. This method is only called once on initComponents
     */
    public abstract String getContentLabelText();

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {
        java.awt.GridBagConstraints gridBagConstraints;

        splitPane = new javax.swing.JSplitPane();
        jScrollPane1 = new javax.swing.JScrollPane();
        dataPanel = new javax.swing.JPanel();
        labelName = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        labelType = new javax.swing.JLabel();
        panelContent = new javax.swing.JPanel();
        jSeparator1 = new javax.swing.JSeparator();
        labelTime = new javax.swing.JLabel();
        jPanel1 = new javax.swing.JPanel();
        map = new org.jdesktop.swingx.JXMapKit();

        setLayout(new java.awt.CardLayout());

        splitPane.setDividerLocation(300);

        dataPanel.setLayout(new java.awt.GridBagLayout());

        labelName.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N
        labelName.setText("Saarschleife");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.gridwidth = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
        gridBagConstraints.insets = new java.awt.Insets(7, 7, 7, 7);
        dataPanel.add(labelName, gridBagConstraints);

        java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("gui/guilabels"); // NOI18N
        jLabel2.setText(bundle.getString("time")); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
        gridBagConstraints.insets = new java.awt.Insets(11, 7, 7, 7);
        dataPanel.add(jLabel2, gridBagConstraints);

        labelType.setText(getContentLabelText());
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.gridwidth = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
        gridBagConstraints.insets = new java.awt.Insets(7, 7, 7, 7);
        dataPanel.add(labelType, gridBagConstraints);

        panelContent.setBorder(javax.swing.BorderFactory.createEmptyBorder(7, 7, 7, 7));
        panelContent.setLayout(new java.awt.CardLayout());
        panelContent.add(getContentComponent(), "contentcard");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.gridwidth = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
        dataPanel.add(panelContent, gridBagConstraints);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.gridwidth = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
        gridBagConstraints.insets = new java.awt.Insets(0, 7, 0, 6);
        dataPanel.add(jSeparator1, gridBagConstraints);

        labelTime.setText("10:30");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.weightx = 1.0;
        dataPanel.add(labelTime, gridBagConstraints);

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 5;
        gridBagConstraints.gridwidth = 2;
        gridBagConstraints.weightx = 1.0;
        gridBagConstraints.weighty = 1.0;
        dataPanel.add(jPanel1, gridBagConstraints);

        jScrollPane1.setViewportView(dataPanel);

        splitPane.setLeftComponent(jScrollPane1);

        map.setDefaultProvider(org.jdesktop.swingx.JXMapKit.DefaultProviders.OpenStreetMaps);
        map.setMiniMapVisible(false);
        splitPane.setRightComponent(map);

        add(splitPane, "card2");
    }// </editor-fold>//GEN-END:initComponents
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JPanel dataPanel;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JSeparator jSeparator1;
    protected javax.swing.JLabel labelName;
    protected javax.swing.JLabel labelTime;
    private javax.swing.JLabel labelType;
    protected org.jdesktop.swingx.JXMapKit map;
    private javax.swing.JPanel panelContent;
    protected javax.swing.JSplitPane splitPane;
    // End of variables declaration//GEN-END:variables
}
